#ifndef AI_ENGINE_POOL_H
#define AI_ENGINE_POOL_H

#include <vector>
#include <mutex>
#include <stdexcept>

#include "../../inc/amcomdef.h"

namespace ai::facial_recognition {

class AIEnginePool {
private:
    std::vector<MHandle> engineHandles;
    std::mutex mutex;

public:
    AIEnginePool(unsigned int max_size);
    ~AIEnginePool();

    MHandle getEngineHandle();

    void releaseEngineHandle(MHandle handle);

private:
    // 初始化人脸识别引擎
    MHandle init_facial_recognition_engine();

};

}
#endif //AI_ENGINE_POOL_H